package com.ncloud.billing.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.ncloud.billing.entity.BsNode;

@Mapper
public interface BsNodeMapper {

	@Select(value = {"SELECT t2.* FROM bs_contract_node t1,bs_node t2 where t1.node_id=t2.node_id and t1.contr_inst_id = #{contract_inst_id}"})
	@Results({ 
	       @Result(column = "node_id", property = "nodeId"),@Result(column = "node_name", property = "nodeName"),
	       @Result(column="node_type",property="nodeType"),@Result(column="access_type",property="accessType"),
	       @Result(column="eff_flag",property="effFlag"),@Result(column="begin_date",property="beginDate"),
	       @Result(column="end_date",property="endDate"),@Result(column="update_time",property="updateTime"),
	       @Result(column="update_user",property="updateUser")})
	public List<BsNode> getBsNodeByContractInstID(@Param("contract_inst_id") Long contract_inst_id);
}
